options[Text] is null or not an object in javascript

Posted by user9167 on Stack Overflow See other posts from Stack Overflow or by user9167
Published on 2012-07-09T07:27:30Z Indexed on 2012/07/10 3:16 UTC
Read the original article Hit count: 59

Filed under:

I am getting options[text] is null or not an object error. What i am trying to do here is i am checking what all multi select lookup column values are selected , comparing them with the value in an array and then removing them

  var responsibleselected = returntags("select","Responsibility selected values");
  for(var i=0;i<responsibleselected.options.length;i++)
  {
       if(responsibleselected.options[i].selected == true)
          {
           for(var j=0;j< ResponsibleArray.length;j++)
            {
 if(responsibleselected.options[i].text == ResponsibleArray[j])//throws error here
             {
       GipRemoveSelectedItems(ctl00_m_g_6ad915a8_68ea_4c76_b67a_ad1215320288_ff391_ctl00_ctl00_MultiLookupPicker_m); 
             }
            }
          }
  }

© Stack Overflow or respective owner

Related posts about JavaScript